class PopularityInfo {
  PopularityInfo({
    this.userId,
    this.iconUrl,
    this.backgroundColor,
    this.levelName,
    this.levelCode,
    this.hotValue,
    this.isInvalid,
    this.topRank,
  });

  PopularityInfo.fromJson(dynamic json) {
    userId = json['userId'];
    iconUrl = json['iconUrl'];
    backgroundColor = json['backgroundColor'];
    levelName = json['levelName'];
    levelCode = json['levelCode'];
    hotValue = json['hotValue'];
    isInvalid = json['isInvalid'];
    topRank = json['topRank'];
  }
  int? userId; // 修改为可空类型
  dynamic iconUrl; // 已经是可空类型，无需修改
  dynamic backgroundColor; // 已经是可空类型，无需修改
  String? levelName; // 修改为可空类型
  int? levelCode; // 修改为可空类型
  int? hotValue; // 修改为可空类型
  bool? isInvalid; // 修改为可空类型
  dynamic topRank; // 已经是可空类型，无需修改

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = userId;
    map['iconUrl'] = iconUrl;
    map['backgroundColor'] = backgroundColor;
    map['levelName'] = levelName;
    map['levelCode'] = levelCode;
    map['hotValue'] = hotValue;
    map['isInvalid'] = isInvalid;
    map['topRank'] = topRank;
    return map;
  }
}